package com.slz3.business.module.configManagement.conShareManage.domain;

import com.slz3.business.frame.annotation.ConfigDomain;
import com.slz3.business.module.configManagement.conShareManage.repository.ConShareManageRepository;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

@ConfigDomain(repositoryClass = ConShareManageRepository.class)
@Entity
@Table(schema = "config_management", name = "con_share_manage")
@Data
@EqualsAndHashCode(callSuper = true)
public class ConShareManage extends ConShareManageEntity implements Serializable {

    private static final long serialVersionUID = 3928173855627287110L;
    @Transient
//    @NotNull(message = "ser1 必须非空!", groups = {Add.class, Modify.class})
//    @Length(min = 1, max = 255, message = "ser1 必须非空!", groups = {Add.class, Modify.class})
    private String serValid;

    @Transient
//    @NotNull(message = "ser2 必须非空!", groups = {Add.class, Modify.class})
//    @Length(min = 1, max = 255, message = "ser2 必须非空!", groups = {Add.class, Modify.class})
    private String serValid2;

    /**
     * 自增 Long
     */
    @Column(insertable = false)
    @ColumnDefault("nextval('mishang_old_frame_id_seq')")
    private Long incrementId;

}
